﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="StudyTime_1.studyCards1"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:StudyTime_1"
    xmlns:common="using:StudyTime_1.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

   
    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Style="{StaticResource LayoutRootStyle}" Background="#FF259CFF">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="140*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>


        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <!-- Back button and page title -->
        <Grid Grid.ColumnSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock x:Name="pageTitle" Text="Study Cards" Style="{StaticResource PageHeaderTextStyle}" Margin="5,0,855,45" Grid.Column="1"/>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}" />
        </Grid>
        <Grid Grid.ColumnSpan="2" Margin="10,5,0,0" x:Name="buttonGrid" Grid.Row="1" VerticalAlignment="Center"  HorizontalAlignment="Center">

            <Button Content="Previous" x:Name="previous" HorizontalAlignment="Left" Height="75" Margin="99.2,535,0,0" VerticalAlignment="Top" Width="252.81" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Click="previous_Click">
                <Button.RenderTransform>
                    <CompositeTransform SkewX="20"  TranslateX="-15" TranslateY="7"/>
                </Button.RenderTransform>
            </Button>
            <Button Content="Next" x:Name="next" HorizontalAlignment="Left" Height="75" Margin="945.2,535,0,0" VerticalAlignment="Top" Width="252" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Click="next_Click">
                <Button.RenderTransform>
                    <CompositeTransform SkewX="-20"  TranslateX="15" TranslateY="7"/>
                </Button.RenderTransform>
            </Button>
            <Button Content="Check" x:Name="check" HorizontalAlignment="Left" Height="75" Margin="973,470,0,0" VerticalAlignment="top" Width="252" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto"  Click="check_Click">
                <Button.RenderTransform>
                    <CompositeTransform SkewX="20"  TranslateX="-13.171" TranslateY="-7.469"/>
                </Button.RenderTransform>
            </Button>
            <Button Content="Flip Back" x:Name="flipBack" HorizontalAlignment="Left" Height="75" Margin="70,475,0,0" VerticalAlignment="Top" Width="252" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Click="flipBack_Click">
                <Button.RenderTransform>
                    <CompositeTransform SkewX="-20"  TranslateX="15.421" TranslateY="-7.462"/>
                </Button.RenderTransform>
            </Button>
            <Button Content="Select Cards" x:Name="selectCards" HorizontalAlignment="Left" Height="61" Margin="74,412,0,0" VerticalAlignment="Top" Width="143" RenderTransformOrigin="0.5,0.5" Click="selectCards_Click" UseLayoutRounding="False" d:LayoutRounding="Auto">
                <Button.RenderTransform>
                    <CompositeTransform SkewX="20"  TranslateX="15.421" TranslateY="-7.462"/>
                </Button.RenderTransform>
            </Button>
            <TextBlock x:Name="errorBox"  HorizontalAlignment="Left" Height="93" Margin="927,-115,0,0" TextWrapping="Wrap"  VerticalAlignment="Top" Width="454" Foreground="#FFFF0101" TextAlignment="Right"/>
            <Border BorderBrush="White" BorderThickness="1" Height="439" HorizontalAlignment="Left" Margin="260,10,0,0" x:Name="border1" VerticalAlignment="Top" Width="757" CornerRadius="5">
                <TextBlock x:Name="cardBox"  HorizontalAlignment="Center" Height="419" Margin="9,9,0,9" TextWrapping="Wrap" VerticalAlignment="Center"  Width="737" FontSize="24" TextAlignment="Center" Padding="0,100,0,0" />
            </Border>

        </Grid>


    </Grid>
</common:LayoutAwarePage>
